{{ define "main" }}
<!-- page info section e.g. current tag & total archive pages -->
<div class="page-info">
  <span>{{ i18n "archivesTotalPages" }}{{ len (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }}</span>
</div>
<!-- archives range in all posts -->
{{ $paginator := .Paginate (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) 50 }}
{{ range $paginator.Pages }}
<div class="post">
  <h3 class="post-item post-title-archive">
    <a href="{{ .Permalink }}">{{ .Title }}</a>
  </h3>
  <div class="post-item post-meta-archive">
    {{ partial "post-meta.html" . }}
  </div>
</div>
{{ end }}

<!-- custom smart pagination -->
{{- partial "pagination.html" (dict "context" . "pagi" $paginator) -}}

{{ end }}
